require('../css/CourseDetails.less')
let userID = location.search.split('=')[1]
if (!userID) {
	location.href = './CourseTraining.html'
}
let videoimg = document.querySelector('#videoimg') //视频图片
let title = document.querySelector('#title') //标题
let describe = document.querySelector('#describe')
let Kilocalorie = document.querySelector('#Kilocalorie') //千卡
let minute = document.querySelector('#minute') //时间
let Practiced = document.querySelector('#Practiced') //多少人练过
let frequency = document.querySelector('#frequency') //次数
let apparatus = document.querySelector('#apparatus') //器械
let codetmainright = document.querySelector('.codetmainright')
window.$http.get(`/sports/courseDetail?id=${userID}`, function (res) {
    Kilocalorie.innerHTML = res.data.calorie
    describe.innerHTML = res.data.desc
    frequency.innerHTML = res.data.frequency
    videoimg.src =window.$BASE_URL+ res.data.imgurl
    title.innerHTML = res.data.name
    minute.innerHTML = res.data.time
    Practiced.innerHTML = res.data.peoplenum
    apparatus.innerHTML = res.data.instrument
    codetmainright.href = `./player.html?courseId=${res.data.courseId}`
})
